//
//  FQBankCardTableViewCell.swift
//  SwiftProject
//
//  Created by 董駸 on 2023/4/5.
//

import UIKit

class FQBankCardTableViewCell: BaseTableViewCell {
    override var contentViewInset: UIEdgeInsets {
        .init(top: 20, left: 20, bottom: 0, right: 20)
    }
    
    let cardNumLb = QMUILabel(font: .rSFont(15), textColor: .white)
    let cardNameLb = QMUILabel(font: .rSFont(16), textColor: .white)
    let cardImageV = UIImageView()
    
    var model : String! {
        didSet {
            cardImageV.backgroundColor = .green
            cardNameLb.text = "银行卡"
            cardNumLb.text = "111111111111"
        }
    }
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        backgroundColor = .colorMake(224, 72, 84)
        layer.cornerRadius = 8
        clipsToBounds = true
        
        contentView.addSubview(cardImageV)
        cardImageV.snp.makeConstraints { make in
            make.left.equalTo(16)
            make.top.equalTo(18)
            make.size.equalTo(36)
        }
        
        contentView.addSubview(cardNumLb)
        cardNumLb.snp.makeConstraints { make in
            make.right.equalTo(-18)
            make.bottom.equalTo(-10)
        }
        
        contentView.addSubview(cardNameLb)
        cardNameLb.snp.makeConstraints { make in
            make.left.equalTo(cardImageV.snp.right).offset(8)
            make.top.equalTo(cardImageV)
        }
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
